package com.tanhua.admin.controller;

import com.tanhua.admin.service.VideosService;
import com.tanhua.model.dto.MessageDto;
import com.tanhua.model.vo.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Xiao
 * @version 1.0
 * @description 视频管理接口
 * @date 2021/11/3
 */
@RestController
@RequestMapping("/manage/videos")
public class VideosController {
    @Autowired
    private VideosService videosService;

    /**
     * 视频管理-视频记录翻页
     * @param messageDto    pagesize、page、uid(用户id)
     * @return
     */
    @GetMapping
    public ResponseEntity getVideoList(MessageDto messageDto) {
        PageResult pageResult = videosService.getVideoList(messageDto);
        return ResponseEntity.ok(pageResult);
    }
}
